// 定义一个可克隆的对象
class Prototype {
  constructor(name, category) {
    this.name = name;
    this.category = category;
  }

  clone() {
    return Object.assign({}, this);
  }
}

// 创建一个原型对象
const original = new Prototype('Original', '类型1');

// 克隆原型对象
const cloned = original.clone();

console.log(cloned);
// {name: "Original", category: "类型1"}
console.log(original === cloned);
// false